﻿using System;

using Yawf.Security.Entities;

namespace Yawf.Security {
	public class FullAccessAuthenticationManager : IAuthenticationManager{
		private PermissionSpecificator specificator;

		public PermissionSpecificator Specificator { get { return specificator; } set { specificator = value;} }

		/// <summary>
		/// Always returns true
		/// </summary>
		/// <param name="user">User to check for</param>
		/// <param name="resource">Resource to check</param>
		/// <returns>true</returns>
		public bool HasPermisssion(IUser user,String resource){
			return true;
		}

		/// <summary>
		/// Always returns null
		/// </summary>
		/// <param name="login">Login</param>
		/// <returns>null</returns>
		public IUser GetUserByLogin(String login){
			return null;
		}

		/// <summary>
		/// Always return true
		/// </summary>
		/// <param name="user">User</param>
		/// <param name="password">password</param>
		/// <returns>ture</returns>
		public bool ValidatePassword(IUser user,String password) {
			return true;
		}

		/// <summary>
		/// Does nothing
		/// </summary>
		/// <param name="login">login</param>
		/// <param name="password">password</param>
		/// <returns>null</returns>
		public IUser Login(String login,String password) {
			return null;
		}

		/// <summary>
		/// Does nothing
		/// </summary>
		/// <param name="theUser">user</param>
		public void Logout(IUser theUser) {
		}

	}
}
